<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

use App\Jobs\SendEmail;

class EmailController extends Controller
{
    //发送短信
    public function send(Request $request)
    {
        $data = $request->all();
        $rounds = !empty($data['rounds']) ? $data['rounds'] : 0;
        $res = dispatch((new SendEmail($rounds))->onQueue('email'));
        print_r($res);
        echo '已经发送：'.date('Y-m-d H:i:s');
    }
}
